unit Main;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, CHDesigner, StdCtrls, CHEdit, LDSEdit, AYLabel, CHLabel,
  LDSLabel, AYEdit;

type
  TFormMain = class(TForm)
    AYEdit1: TAYEdit;
    AYLabel1: TAYLabel;
    Button1: TButton;
    procedure FormCreate(Sender: TObject);
    procedure FormDestroy(Sender: TObject);
    procedure AYLabel1Click(Sender: TObject);
    procedure Button1Click(Sender: TObject);
  private
    { Private declarations }
    LSDLable : TLDSLabel;
  public
    { Public declarations }
  end;

var
  FormMain: TFormMain;

implementation
uses CHDesign;
{$R *.dfm}

procedure TFormMain.FormCreate(Sender: TObject);
begin
  LSDLable := TLDSLabel.Create(Self);
  LSDLable.Parent := Self;
  LSDLable.Left := 100;
  LSDLable.Top := 200;
  LSDLable.Caption := 'aaaaaaaaaa';

{  AYEdit1.Text := Format('L.X:%d L.Y:%d,C.X:%d C.Y:%d',
    [LSDLable.Left,LSDLable.Top,LSDLable.EditCheckBox.Left,LSDLable.EditCheckBox.Top]);
}
end;

procedure TFormMain.FormDestroy(Sender: TObject);
begin
  LSDLable.Free;
end;

procedure TFormMain.AYLabel1Click(Sender: TObject);
begin
//  ShowMessage('');
end;

procedure TFormMain.Button1Click(Sender: TObject);
var
  CHDesign : TFmCHDesign;
  M: TMemoryStream;
begin
  M := TMemoryStream.Create;
  CHDesign := TFmCHDesign.Create(Self);
  try
    CHDesign.LoadFromStream(M);
    CHDesign.ShowModal;
  finally
    CHDesign.Free;
    CHDesign := Nil;
    M.Free;
  end;
end;

end.
